package com.mec.offload.service.impl;


import com.mec.offload.dao.LicensePlateMapper;
import com.mec.offload.model.LicensePlate;
import com.mec.offload.service.LicensePlateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LicensePlateServiceImpl implements LicensePlateService {
    @Autowired
    private LicensePlateMapper licensePlateMapper;
    public List<LicensePlate> getAllLicensePlate(){
        try {
            return licensePlateMapper.getAllLicensePlate();
        }catch (Exception e){

            e.printStackTrace();
        }
        System.out.println("LicensePlateServiceImpl error");
        return null;
    }

    public LicensePlate findLicensePlate(String licensePlate)
    {
        try {
            return licensePlateMapper.findLicensePlate(licensePlate);
        }catch (Exception e){
            e.printStackTrace();
        }
        return licensePlateMapper.findLicensePlate(licensePlate);
    }

}
